home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-03 | 2.0 KB | 70 lines | [TEXT/MPS ] |
- // UDragDropBehavior
- // Copyright © 1994-96 by Apple Computer, Inc. All rights reserved.
-
-
- #ifndef __UDRAGDROPBEHAVIOR__
- #define __UDRAGDROPBEHAVIOR__
-
- // MacApp
-
- #ifndef __UBEHAVIOR__
- #include "UBehavior.h"
- #endif
-
- const IDType kDragDropBehavior = 'drag';
-
- //----------------------------------------------------------------------------------------
- // class TDragDropBehavior
- //----------------------------------------------------------------------------------------
-
- class TDragDropBehavior : public TBehavior
- {
- MA_DECLARE_CLASS;
-
- protected:
-
- Boolean fDraggable; // indicates whether or not the owner view's contents
- // can be dragged
- Boolean fDroppable; // indicates whether or not the owner view can receive
- // drops
-
- short fDragMoveDeterminer; // defines context for drag move. one of the following
- // values: kNeverMove, kMoveWithinView, kMoveWithinWindow,
- // kMoveWithinContext, kMoveWithinApplication
-
- IDType fDragMoveFamily; // Used with fDragMoveDeterminer to determine if a drag
- // operation should be treated as a copy or a move.
- // If the source and target of the drag are within
- // the context defined by the source view's fDragMoveDeterminer
- // and their fDragMoveFamily values match or are both
- // kNoID, it's a move.
- public:
- TDragDropBehavior(void);
- // Constructor
- virtual ~TDragDropBehavior();
- // Destructor
-
- virtual void IDragDropBehavior( IDType itsIdentifier,
- Boolean draggable,
- Boolean droppable,
- short dragMoveDeterminer,
- IDType dragMoveFamily);
- // Initialize the behavior programatically
-
- void ReadFrom(TStream* aStream);
- // Read the behavior's data from a stream
-
- void WriteTo(TStream* aStream);
- // Write the behavior's data to a stream
-
- virtual void SetOwner(TEventHandler *itsOwner);
- // Override
-
- virtual IDType GetStandardSignature();
- // Returns this class's standard signature.
-
- }; // class TDragDropBehavior
-
- #endif // __UDRAGDROPBEHAVIOR__
-
-